# 编写程序，爬取萍乡学院官网的页面信息，将爬取到的页面保存到“D:\\萍乡学院.html”(注意字符编码问题和UA伪装)
import requests

url = 'https://www.pxc.jx.cn/'
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36'
}
response = requests.get(url=url, headers=headers)
response.encoding = 'utf-8'
html = response.text
with open('D:\\萍乡学院.html', 'w', encoding='utf-8') as f:
    f.write(html)
